﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Robotics.Race
{
	public class ControlGear
	{
		/// <summary>
		/// Represents the acceleration rate:
		/// -1.0 means full braking or accelerating backward
		/// 1.0 means full accelerating forward
		/// </summary>
		private double acceleration;
		public double Acceleration
		{
			get { return acceleration; }
			set { acceleration = Math.Max(Math.Min(value, 1.0), -1.0); }
		}

		private bool handbrake;
		public bool Handbrake
		{
			get { return handbrake; }
			set { handbrake = value; }
		}

		private double steering;
		public double Steering
		{
			get { return steering; }
			set { steering = Math.Max( Math.Min( value, 1.0 ), -1.0 ); }
		}
	}
}
